import rospy
import sys
from lesson3_srv.srv import *
rospy.init_node("sum_client")
client=rospy.ServiceProxy("sum2",Addints)

if(len(sys.argv)!=3):
    rospy.logerr("参数不对")
    sys.exit(1)


num=int(sys.argv[1])
num2=int(sys.argv[2])

#client.wait_for_service()
rospy.wait_for_service("sum2")
response=client.call(num,num2)
rospy.loginfo("%d",response.ans)